import request from '@/utils/request'
import { tradeApi } from '@/utils/comm'

// 查询列表
export function listServerProperty(query) {
  return request({
    url: `${tradeApi}/serverProperty/list`,
    method: 'get',
    params: query
  })
}

// 查询详情
export function getServerProperty(id) {
  return request({
    url: `${tradeApi}/serverProperty/` + id,
    method: 'get'
  })
}

// 新增
export function addServerProperty(data) {
  return request({
    url: `${tradeApi}/serverProperty`,
    method: 'post',
    data: data
  })
}

// 修改
export function updateServerProperty(data) {
  return request({
    url: `${tradeApi}/serverProperty`,
    method: 'put',
    data: data
  })
}

// 删除
export function delServerProperty(ids) {
  return request({
    url: `${tradeApi}/serverProperty/` + ids,
    method: 'DELETE',
  })
}

// 查询所有服务属性项列表
export function listAllServerProperty(query) {
  return request({
    url: `${tradeApi}/serverProperty/optionSelect`,
    method: 'get',
    params: query
  })
}